package com.itheima.practice;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class 字符缓冲流特有功能拷贝文本文件 {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new FileReader("aa.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("bb.txt"));

        String line;
        while ((line = br.readLine()) != null){
            bw.write(line);
            bw.newLine();
            bw.flush();
        }

        br.close();
        bw.close();
    }
}
